welo git mirrors
Commit 03ddb0824852ce9a7130ac0fc2df44d6485a73eb
Parents : 422dc05
Author : Mark Qvist <bc7291552be7a58f361522990465165c>
Signature : T66BB85Valid, signed by author
Date : 2026-06-19T10:15:32+02:00
Added recursive_prs interface option
Changes
4 files changed, 17 insertions(+), 2 deletions(-)
Diff
diff --git a/RNS/Interfaces/Interface.py b/RNS/Interfaces/Interface.py
index 692025643..351da716f 100755
--- a/RNS/Interfaces/Interface.py
+++ b/RNS/Interfaces/Interface.py
@@ -106,6 +106,7 @@ class Interface:
self.discoverable = False
self.last_discovery_announce = 0
self.bootstrap_only = False
+ self.recursive_prs = False
self.parent_interface = None
self.spawned_interfaces = None
self.tunnel_id = None
diff --git a/RNS/Reticulum.py b/RNS/Reticulum.py
index e558b1d23..b8691f7d0 100755
--- a/RNS/Reticulum.py
+++ b/RNS/Reticulum.py
@@ -806,6 +806,9 @@ class Reticulum:
bootstrap_only = False
if "bootstrap_only" in c: bootstrap_only = c.as_bool("bootstrap_only")
+ recursive_prs = False
+ if "recursive_prs" in c: recursive_prs = c.as_bool("recursive_prs")
+
ignore_config_warnings = False
if "ignore_config_warnings" in c: ignore_config_warnings = c.as_bool("ignore_config_warnings")
@@ -886,6 +889,7 @@ class Reticulum:
interface.discovery_bandwidth = discovery_bandwidth
interface.discovery_modulation = discovery_modulation
+ interface.recursive_prs = recursive_prs
interface.announce_rate_target = announce_rate_target
interface.announce_rate_grace = announce_rate_grace
interface.announce_rate_penalty = announce_rate_penalty
@@ -1044,7 +1048,8 @@ class Reticulum:
RNS.panic()
def _add_interface(self, interface, mode = None, configured_bitrate=None, ifac_size=None, ifac_netname=None, ifac_netkey=None,
- announce_cap=None, announce_rate_target=None, announce_rate_grace=None, announce_rate_penalty=None, bootstrap_only=False):
+ announce_cap=None, announce_rate_target=None, announce_rate_grace=None, announce_rate_penalty=None,
+ bootstrap_only=False, recursive_prs=False):
if not self.is_connected_to_shared_instance:
if interface != None and issubclass(type(interface), RNS.Interfaces.Interface.Interface):
@@ -1059,6 +1064,7 @@ class Reticulum:
if ifac_size != None: interface.ifac_size = ifac_size
else: interface.ifac_size = interface.DEFAULT_IFAC_SIZE
+ interface.recursive_prs = recursive_prs
interface.announce_cap = announce_cap if announce_cap != None else Reticulum.ANNOUNCE_CAP/100.0
interface.announce_rate_target = announce_rate_target
interface.announce_rate_grace = announce_rate_grace
diff --git a/RNS/Transport.py b/RNS/Transport.py
index b0bba5370..644fabd52 100755
--- a/RNS/Transport.py
+++ b/RNS/Transport.py
@@ -2915,7 +2915,8 @@ class Transport:
if attached_interface != None:
should_ingress_limit = attached_interface.should_ingress_limit_pr()
if RNS.Reticulum.transport_enabled():
- if attached_interface.mode in RNS.Interfaces.Interface.Interface.DISCOVER_PATHS_FOR: should_search_for_unknown = True
+ if attached_interface.recursive_prs: should_search_for_unknown = True
+ elif attached_interface.mode in RNS.Interfaces.Interface.Interface.DISCOVER_PATHS_FOR: should_search_for_unknown = True
if RNS.sl(RNS.LOG_DEBUG):
interface_str = f" on {attached_interface}"
diff --git a/docs/source/interfaces.rst b/docs/source/interfaces.rst
index 079c5b1e3..f22aefcae 100644
--- a/docs/source/interfaces.rst
+++ b/docs/source/interfaces.rst
@@ -1207,6 +1207,13 @@ These can be used to control various aspects of interface behaviour.
link or a remote TCP tunnel) solely to discover better local
infrastructure, which then supersedes the bootstrap interface.
+
+ * | The ``recursive_prs`` option allows you to enable recursive path
+ discovery on an interface regardless of its configured interface
+ mode. When this option is enabled, Reticulum will attempt to
+ recursively discover paths for path requests received on this
+ interface.
+
.. _interfaces-modes:
Interface Modes
Served by rngit 1.4.2 - Generated in 0.07s